Ext.define('extjs6test.view.base.BaseEditWindow', {
    extend: 'Ext.window.Window',
    alias:'widget.baseewin',
    requires:[
        'extjs6test.view.base.BaseEditWindowController'
    ],
    viewModel:'main',
    controller:'baseew',
    items: [],
    formItems:null,//mixedCollection
    formLayout:null,
    formStore:null,
    mode: "new",
    hideFields: [],
    buttons: [
        {
            handler: 'onOkButtonClick',
            action: "enter",
            bind: {
                text: '{baseEditWindow.OkButton.text}'
            }
        },
        {
            handler: 'onCloseButtonClick',
            action: "close",
            bind: {
                text: '{baseEditWindow.closeButton.text}'
            }
        }
    ],
    initComponent: function () {
        var me = this;

        me.formItems = me.formItems || new Ext.util.MixedCollection();
        me.formLayout = me.formLayout || 'auto';
        Ext.apply(me, {
            items: [
                {
                    xtype:'form',
                    bodyPadding:9,
                    layout:this.formLayout,
                    defaults:{
                        padding:'0 9 0 0'
                    },
                    items:this.formItems
                }
            ]
        });
        this.callParent(arguments);
    },
    listeners:{
        render: 'onWindowRender',
        beforerender: "onWindowBeforeRender",
        afterrender: "onWindowAfterRender"
    }
});